package com.we.flink.userlabelplatform.table;

import java.sql.Timestamp;

public class TableSaveMoneyCardMember {
    public static final String KFKTABLE = "fdm.hhl01_save_money_card_member";
    public static final String QUERYSQL =
            "select uid, "
                    +
                    //            "if(end_time is null, TIMESTAMP '1970-01-01 08:00:00.000000',
                    // end_time) as end_time, " +
                    "open_time, end_time, update_time, "
                    + "card_type "
                    + "from "
                    + KFKTABLE
                    + " where delete_time is null "
                    + "and card_type in (1, 10, 12, 19, 24) "
                    + "and open_time is not null "
                    + "and end_time is not null "
                    + "and update_time is not null";

    public long uid;

    /** default null column */
    public Timestamp open_time;

    public Timestamp end_time;
    public Timestamp update_time;
    public byte card_type; // 1: savemoney_card  10: hale_card 12:haojie_card
    //    public byte status; //0无效，1有效，2取消

    public TableSaveMoneyCardMember() {}

    public TableSaveMoneyCardMember(
            long uid,
            Timestamp open_time,
            Timestamp end_time,
            Timestamp update_time,
            byte card_type) {
        this.uid = uid;
        this.open_time = open_time;
        this.end_time = end_time;
        this.update_time = update_time;
        this.card_type = card_type;
    }

    @Override
    public String toString() {
        return "TableSaveMoneyCardMember{"
                + "uid="
                + uid
                + ", end_time="
                + end_time
                + ", card_type="
                + card_type
                + '}';
    }

    public long getUid() {
        return uid;
    }

    public Timestamp getOpen_time() {
        return open_time;
    }

    public Timestamp getUpdate_time() {
        return update_time;
    }

    public Timestamp getEnd_time() {
        return end_time;
    }

    public byte getCard_type() {
        return card_type;
    }
}
